#!/usr/bin/perl -w

print "Enter some lines, then press Ctrl + D:\n";
# 下面这句话可以直接完成题目！好好品读
# print reverse <STDIN>;

@list = <STDIN>;
@list_r = reverse(@list);

print "print 直接输出：\n";
print @list_r;

print "for 循环遍历输出：\n";
for(@list_r) {print $_;}
